﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;

namespace DuAnWinFCuoiKy
{
    public partial class frm_main : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        BUS_SinhVien qlsv = new BUS_SinhVien();
        public frm_main()
        {
            InitializeComponent();
        }

        private void frm_main_Load(object sender, EventArgs e)
        {

        }

        private void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            
        }

        private void barButtonItem29_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {

        }

        private void barButtonItem30_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ctrl_ctdt qlCTDT = new ctrl_ctdt();
            main_panel.Controls.Clear();
            main_panel.Controls.Add(qlCTDT);
            qlCTDT.Show();
        }

        private void btnLoadSV_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            grid_main.DataSource = qlsv.LoadDSSinhVien();


            ribbonPageGroupSV.Enabled = true;
            ribbonPageGroupKhoa.Enabled = false;
        }

        private void btnThemSV_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ctrl_sinhvien qlSV = new ctrl_sinhvien();
            main_panel.Controls.Clear();
            main_panel.Controls.Add(qlSV);
            qlSV.Show();
        }

        private void navExit_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e)
        {
            Application.Exit();
        }
    }
}
